<template>
  <div>
    <h4>子组件</h4>
    <p>{{ value }}</p>
    <input
      type="text"
      :value="value"
      @input="$emit('input', $event.target.value)"
    />
    <button @click="$emit('input', value + 1)">增加</button>
  </div>
</template>

<script>
export default {
  name: "Child",
  props: ["value"],
};
</script>

<style>
</style>